/*
 * Copyright 2016-2018 TVI Go Easy.
 * Created on 2018/1/29 16:39
 */
package com.tvi.cloud.organization.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 组织远程访问服务
 *
 * @author mechanic
 */
@Service
public class LicenseService {
    private final LicenseFeignClient feignClient;

    @Autowired
    public LicenseService(LicenseFeignClient feignClient) {
        this.feignClient = feignClient;
    }

//    @Autowired
//    OrganizationRibbonClent ribbonClent;

//    @Autowired
//    OrganizationDiscoveryClient discoveryClient;

//    @HystrixCommand
    public Object retrieveLicenseInfo(@RequestHeader("Authorization") String authorizationToken,String licenseId){
        return feignClient.getOrganization(authorizationToken,licenseId);
    }
}
